package main;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;

public class PartidasSinCoincidir {
	private static Connection conexion;
	private static ArrayList<Integer> listaPartidas;

	/**
	 * @param args
	 * @throws ClassNotFoundException 
	 * @throws SQLException 
	 */
	public static void main(String[] args) throws ClassNotFoundException, SQLException {
		// TODO Auto-generated method stub
		ResultSet rs; Statement st;
		ResultSet rs1; Statement st1;
		ResultSet rs2; Statement st2;
		ResultSet rs3; Statement st3;
		Class.forName("com.mysql.jdbc.Driver");
		conexion = DriverManager.getConnection("jdbc:mysql://localhost/proyecto", "root", "gracias");
		st = conexion.createStatement(); st1 = conexion.createStatement(); st2 = conexion.createStatement();
		st3 = conexion.createStatement();
		listaPartidas = new ArrayList<Integer>();

		int id = 863; int partida;
		
		rs = st.executeQuery("SELECT idMatch FROM gameplaymatchuser WHERE idPlayer = '"+id+"'");
		while(rs.next()) {
			partida = rs.getInt("idMatch");
			listaPartidas.add(partida);
		}
		rs = st.executeQuery("SELECT idMatch FROM flageventsummaryplayer WHERE idPlayer = '"+id+"'");
		
		while(rs.next()) {
			partida = rs.getInt("idMatch");
			if(!listaPartidas.contains(partida))
				System.out.println(partida);
		}
	}

}
